package com.longqin.wechat.service;

import org.springframework.web.bind.annotation.RequestParam;

import com.longqin.wechat.entity.AccessToken;

/**
 * @Description: 账号接口
 * @Author longqin
 * @Date 2025-05-07
 * 
 */
public interface UserService {
	
	/**微信授权同时返回是否绑定
	 * @param code
	 * @return
	 * @throws Exception
	 */
	public AccessToken authorization(@RequestParam String code) throws Exception;
	
	/**登录
	 * @param userName 账号
	 * @param password 密码
	 * @param openId 微信唯一标识
	 * @return
	 * @throws Exception
	 */
	public AccessToken login(String userName,String password,String openId) throws Exception;
	
	/**
	 * @Description: 刷新token
	 * @param refresh_token
	 * @return
	 * @throws Exception
	 * 
	 */
	public AccessToken refreshToken(String refresh_token) throws Exception;
	
	/**
	 * @Description: 退出登录，解除微信和账号的绑定
	 * @param openId
	 * @return
	 * @throws Exception
	 * 
	 */
	public boolean wxLogout(String openId) throws Exception;

}
